Skip to content

feat(extension): browser extension core for Chrome and Firefox#418

Open
oxr463 wants to merge 2 commits into
mainfrom
feature/browser-extensions
Open

feat(extension): browser extension core for Chrome and Firefox#418
oxr463 wants to merge 2 commits into
mainfrom
feature/browser-extensions

Conversation

@oxr463
Copy link
Copy Markdown
Collaborator

@oxr463 oxr463 commented May 25, 2026

Issue number: resolves #417


Checklist

  • Code Formatter (run prettier/spotlessApply)
  • Code has unit tests? (If no explain in other_information)
  • Builds on localhost
  • Builds/Runs in docker compose

What is the current behavior?

There is no browser extension. Users must navigate to the FindFirst web app, manually enter a URL and title, and select tags to save a bookmark — interrupting their browsing flow.

The repository contained only a non-functional Firefox Manifest V2 stub and an empty Chrome directory.

What is the new behavior?

  • One-click save — popup lets users save the current tab's URL and title to FindFirst without leaving the page
  • Tag support — autocomplete from existing tags; create new tags inline during save
  • Context menu — right-click any page or link to save it directly
  • Options page — configure FindFirst server base URL and view connection status; supports any self-hosted instance
  • Auth flow — sign in from within the extension; JWT stored in extension storage and sent as Authorization: Bearer to work around SameSite=Lax blocking on cross-origin requests from extension origins
  • Dual-browser support — single shared TypeScript source tree (src/) builds separate Chrome MV3 (dist/chrome/) and Firefox MV3 (dist/firefox/) artifacts via esbuild
  • 28 unit tests — covering the API client, storage helpers, tag logic, and URL validation (Vitest)

Does this introduce a breaking change?

  • Yes
  • No

Other information

CORS requirement: The FindFirst API server must return Access-Control-Allow-Origin and Access-Control-Allow-Credentials: true for requests from chrome-extension:// and moz-extension:// origins before the extension can communicate with the backend
end-to-end. This may require a server-side change in FindFirst-core.

Docker Compose: The extension is a static build artifact loaded directly into the browser — it does not run as a container. The checklist item is not applicable.

Screenshot 2026-05-24 at 7 04 39 PM Screenshot 2026-05-24 at 7 05 49 PM Screenshot 2026-05-24 at 7 07 06 PM Screenshot 2026-05-24 at 7 07 31 PM Screenshot 2026-05-24 at 7 12 10 PM Screenshot 2026-05-24 at 7 13 12 PM

- Add chrome-extension:// and moz-extension:// to CORS allowed origin
  patterns so the extension can make credentialed requests
- Fix UserContext.getUserId() to handle JwtAuthenticationToken (set by
  oauth2ResourceServer for Bearer token requests) in addition to the
  existing UserAuthenticationToken (set by the cookie filter); the hard
  cast was causing a ClassCastException and 500 on all extension API calls
@oxr463 oxr463 requested a review from R-Sandor May 25, 2026 01:10
@oxr463 oxr463 self-assigned this May 25, 2026
@oxr463 oxr463 added the enhancement New feature or request label May 25, 2026
- Mock next/font/google in vitestSetup to fix Libre_Baskerville not-a-function error in app.test.tsx
- Always render brand logo in Navbar (remove isMobile conditional that hid it on desktop); drop unused isMobile state and resize effect
- Update default avatar test to assert SVG icon presence instead of stale img/src expectation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Browser extension for one-click bookmarking from Chrome and Firefox

1 participant